<script>
import { h } from 'vue'
export default {
  render(proxy) {
    const items = proxy.$slots.default()
    const renderList = []
    items.forEach((item, index) => {
      if (item.type.name === "XtxBreadItem" || item.type.name === "Transition") {
        renderList.push(item)
        if (item.props && item.props.to) {
          renderList.push(h('i', { class: 'iconfont icon-angle-right' }))
        }
      }
    });
    return h('div', { class: 'xtx-bread' }, renderList)
  }
}
</script>

<style lang="less">
.xtx-bread {
  display: flex;
  padding: 25px 10px;
  &-item {
    a {
      color: #666;
      transition: all 0.4s;
      &:hover {
        color: @xtxColor;
      }
    }
  }
  i {
    font-size: 12px;
    margin-left: 5px;
    margin-right: 5px;
    line-height: 22px;
  }
}
</style>
